import request from '@/utils/request'

export default {
  // 组合条件查询资源信息
  getResourcesPage(current, limit, resourceQuery) {
    return request({
      url: `/resources/pageResourcesCondition/${current}/${limit}`,
      method: 'post',
      data: resourceQuery
    })
  },

  //删除资源，及该资源下的所有子信息
  deleteResource(recourseId) {
    return request({
      url: `/resources/deleteResource/${recourseId}`,
      method: 'delete',
    })
  },

  //修改资源信息
  updateResource(resources) {
    return request({
      url: `/resources/updateResource`,
      method: 'put',
      data: resources
    })
  },

  //增加新的资源
  addResource(resources) {
    return request({
      url: `/resources/addResource`,
      method: 'post',
      data: resources
    })
  }

}
